// 订单相关
import request from '@/utils/request'

// 订单列表
export function getOrderListApi(data) {
  return request({
    url: '/api/order.order/index',
    method: 'post',
    data
  })
}

export function getPlanListApi(data) {
  return request({
    url: "/api/order.order/plan",
    method: "post",
    data,
  });
}

export function getRefundListApi(data) {
  data['status'] = -1;
  return request({
    url: "/api/order.order/index",
    method: "post",
    data,
  });
}

// 编辑订单
export function createOrderApi(data) {
  return request({
    url: '/api/order.order/create',
    method: 'post',
    data
  })
}

export function updateOrderApi(data) {
  return request({
    url: '/api/order.order/update',
    method: 'post',
    data
  })
}

// update bom
export function doUpdateBomApi(data) {
  return request({
    url: '/api/order.order/updateBom',
    method: 'post',
    data
  })
}

// update vip
export function doUpdateVipApi(data) {
  return request({
    url: '/api/order.order/updateVip',
    method: 'post',
    data
  })
}

export function createRebateApi(data) {
  return request({
    url: '/api/order.rebate/create',
    method: 'post',
    data
  })
}

export function updateRebateApi(data) {
  return request({
    url: '/api/order.rebate/update',
    method: 'post',
    data
  })
}

export function createDepositApi(data) {
  return request({
    url: '/api/order.deposit/create',
    method: 'post',
    data
  })
}

export function updateDepositApi(data) {
  return request({
    url: '/api/order.deposit/update',
    method: 'post',
    data
  })
}

// 取消订单
export function cancelOrderApi(data) {
  return request({
    url: '/api/order.order/cancel',
    method: 'post',
    data
  })
}

// 删除订单
export function deleteOrderApi(data) {
  return request({
    url: '/api/order.order/delete',
    method: 'post',
    data
  })
}

// 获取订单详情
export function getOrderDetailApi(data) {
  return request({
    url: '/api/order.order/detail',
    method: 'post',
    data
  })
}

// 转单
export function doTransferApi(data) {
  return request({
    url: "/api/order.user/transfer",
    method: "post",
    data,
  });
}

export function doRefundApi(data) {
  return request({
    url: '/api/order.order/doRefund',
    method: 'post',
    data
  })
}


export function getParentApi(data) {
  return request({
    url: "/api/order.deposit/detail",
    method: "post",
    data,
  });
}

export function doExportApi(data) {
  return request({
    url: "/api/order.order/export",
    method: "post",
    data,
  });
}





